<?php
/**
 * Created by PhpStorm.
 * User: Tsang
 * Date: 2017/9/24 16:20
 *
 */

namespace app\api\model;

use think\Model;

class Team extends Model
{
    protected $type = [
        'created_at'    =>  'timestamp:Y-m-d H:i:s',
        'update_at'     =>  'timestamp:Y-m-d H:i:s',
    ];
    /**
     * 获取团队
     * @param $original
     * @return mixed
     */
    public function getTeam($where='')
    {
        $team = $this->where($where)->find();
        return $team;
    }
    /**
     * 获取所有团队
     * @param $original
     * @return mixed
     */
    public function getTeamAll($where='')
    {

        $team = $this->where($where)->select();
      
        return $team;
    }

    /**
     * 添加团队
     * @param $original
     * @return mixed
     */
    public function addTeam($data='')
    {
        $id = $this->insertGetId($data);
        return $id;
    }
}